<?php
/**
 * Created by PhpStorm.
 * User: ASUS
 * Date: 2017/11/7
 * Time: 17:01
 */
//主机名 IP
define('HOST','localhost');
//用户名
define('USER','root');
//密码
define('PWD','');
//数据库
define('DB','lyb');
//字符集
define('CHAR','utf8');

$link=mysqli_connect(HOST,USER,PWD) or die('数据库连接失败！');
mysqli_select_db($link,'lyb');
mysqli_set_charset($link,'utf8');